import { Space, Table, Tag, Watermark } from "antd";
import { Components } from "antd/es/date-picker/generatePicker";
import { ColumnsType } from "antd/es/table";
import { useEffect } from "react";
import * as api from "../../api/uselist";

export const Welcome = () => {
  interface DataType {
    key: string;
    name: string;
    age: number;
    address: string;
    tags?: string[];
  }

  const columns = [
    {
      title: "Name",
      dataIndex: "name",
      key: "name",
    },
    {
      title: "Age",
      dataIndex: "age",
      key: "age",
    },
    {
      title: "Address",
      dataIndex: "address",
      key: "address",
    },
    {
      title: "Action",
      key: "action",
    },
  ];

  const data = [
    {
      key: "1",
      name: "John Brown",
      age: 32,
      address: "New York No. 1 Lake Park",
      //   tags: ["nice", "developer"],
    },
    {
      key: "2",
      name: "Jim Green",
      age: 42,
      address: "London No. 1 Lake Park",
      //   tags: ["loser"],
    },
    {
      key: "3",
      name: "Joe Black",
      age: 32,
      address: "Sidney No. 1 Lake Park",
      //   tags: ["cool", "teacher"],
    },
  ];

  return (
    <div>
      <Watermark content="yuerwang">
        <Table columns={columns} dataSource={data}></Table>
      </Watermark>
    </div>
  );
};
